package com.kitty.game.confirm.service.handler;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.confirm.model.ConfirmType;

import java.util.HashMap;
import java.util.Map;
//后写
//import com.kitty.game.confirm.service.handler.BuyWeddingConfirmHandler;
import com.kitty.game.difu.service.handler.GhostGuiChongConfirmHandler;
import com.kitty.game.fixed.handler.QuitFixedTeamConfirmHandler;
import com.kitty.game.function.service.BuyTeamIconConfirmHandler;
import com.kitty.game.xmd.XianMoConfirmHandler;


/**确认框*/
public enum ConfirmHandlerHelper {
    INSTANCE;

    private Map<ConfirmType, ConfirmHandler> handlers = new HashMap<>();

    private void registerHandler(ConfirmType confirmType, ConfirmHandler confirmHandler) {
        handlers.put(confirmType, confirmHandler);
    }

    public ConfirmHandler getTargetHandler(ConfirmType confirmType) {
        return handlers.get(confirmType);
    }

    public void initialize() {
        registerHandler(ConfirmType.CHOOSE_ATK, SpringUtils.getBean(ChooseAtkConfirmHandler.class));
        registerHandler(ConfirmType.GIVE_UP_TASK, SpringUtils.getBean(GiveUpTaskConfirmHandler.class));
        registerHandler(ConfirmType.HELP_PEOPLE_REWARD_MORE, SpringUtils.getBean(HelpPeopleConfirmHandler.class));
        registerHandler(ConfirmType.TOWER_FLY_UP, SpringUtils.getBean(TowerFlyUpConfirmHandler.class));
        registerHandler(ConfirmType.TOWER_CHANGE_REWARD, SpringUtils.getBean(TowerChangeRewardConfirmHandler.class));
        registerHandler(ConfirmType.FIGHT_SEAL_BOSS, SpringUtils.getBean(FightSealBossConfirmHandler.class));
        registerHandler(ConfirmType.PET_FIGHT, SpringUtils.getBean(PetFightConfirmHandler.class));
        registerHandler(ConfirmType.DO_REPLENISH_SIGN, SpringUtils.getBean(DoReplenishConfirmHandler.class));
        registerHandler(ConfirmType.BUY_CUSTOMFASHION, SpringUtils.getBean(BuyCustomFasionConfirmHandler.class));
        registerHandler(ConfirmType.BUY_FASHION, SpringUtils.getBean(BuyFashionConfirmHandler.class));
        registerHandler(ConfirmType.BUY_FOLLOWPET, SpringUtils.getBean(BuyFollowPetConfirmHandler.class));
        registerHandler(ConfirmType.BUY_EFFECT, SpringUtils.getBean(BuyEffectConfirmHandler.class));
        registerHandler(ConfirmType.BUY_VIP, SpringUtils.getBean(BuyVipConfirmHandler.class));
        registerHandler(ConfirmType.EXCHANGE_PET, SpringUtils.getBean(ExChangePetConfirmHandler.class));
        registerHandler(ConfirmType.RETURN_TEAM, SpringUtils.getBean(ReturnTeamHandler.class));
        registerHandler(ConfirmType.USE_CHANGE_CARD, SpringUtils.getBean(UseChangeCardHandler.class));
        registerHandler(ConfirmType.USE_SHAPE_PEN, SpringUtils.getBean(UseShapePenHandler.class));

        registerHandler(ConfirmType.LEAVE_TEAM, SpringUtils.getBean(LeaveTeamConfirmHandler.class));
        registerHandler(ConfirmType.zhj_duihuan, SpringUtils.getBean(ZHJConfirmHandler.class));
        registerHandler(ConfirmType.invite_reward, SpringUtils.getBean(HDDSInviteConfirmHandler.class));
        registerHandler(ConfirmType.offline_reward, SpringUtils.getBean(HDDSOfflineConfirmHandler.class));
        registerHandler(ConfirmType.BUY_offline, SpringUtils.getBean(OfflineConfirmHandler.class));
        registerHandler(ConfirmType.BUY_offline_time, SpringUtils.getBean(OfflineTimeConfirmHandler.class));
        registerHandler(ConfirmType.dwdr_leiji, SpringUtils.getBean(DWDRConfirmHandler.class));
        registerHandler(ConfirmType.msdr_onekey, SpringUtils.getBean(MSDRConfirmHandler.class));
        registerHandler(ConfirmType.gsg_gaizao, SpringUtils.getBean(GSGConfirmHandler.class));
        registerHandler(ConfirmType.REQUEST_TEAN_LEADER, SpringUtils.getBean(RequestTeamLeaderHandler.class));
        registerHandler(ConfirmType.FETCH_SHUADAO_REWARD, SpringUtils.getBean(FetchShuaDaoRewardConfirmHandler.class));
        registerHandler(ConfirmType.AVOID_MONSTER, SpringUtils.getBean(AvoidMonsterConfirmHandler.class));
        registerHandler(ConfirmType.CREATE_PARTY, SpringUtils.getBean(CreatePartyConfrimHandler.class));
        registerHandler(ConfirmType.PARTY_DONATE, SpringUtils.getBean(PartyDonateConfirmHandler.class));
        registerHandler(ConfirmType.FORCE_PK, SpringUtils.getBean(ForcePKConfirmHandler.class));
        registerHandler(ConfirmType.PRISON_RELEASE, SpringUtils.getBean(PrisonReleaseConfirmHandler.class));
        registerHandler(ConfirmType.GOTO_FPK, SpringUtils.getBean(GotoFPKConfirmHandler.class));
        registerHandler(ConfirmType.ACCEPT_KILL_TASK, SpringUtils.getBean(AcceptKillTaskConfirmHandler.class));
        registerHandler(ConfirmType.ADD_FRIEND, SpringUtils.getBean(AddFriendConfirmHandler.class));
        registerHandler(ConfirmType.CANCAL_DUGEON, SpringUtils.getBean(CancelDugeonConfirmHandler.class));
        registerHandler(ConfirmType.BUY_DEVIL_TIME, SpringUtils.getBean(BuyDevilTimeConfirmHandler.class));
        registerHandler(ConfirmType.LIHUN, SpringUtils.getBean(LihunConfirmHandler.class));//离婚
        registerHandler(ConfirmType.XIANMO_RE, SpringUtils.getBean(XianMoConfirmHandler.class));//仙魔转换
        registerHandler(ConfirmType.DELETE_ROLE, SpringUtils.getBean(DeleteRoleConfirmHandler.class));
        registerHandler(ConfirmType.ZHAOHUAN_GUICHONG, SpringUtils.getBean(GhostGuiChongConfirmHandler.class));
        registerHandler(ConfirmType.QUIT_FIXEDTEAM, SpringUtils.getBean(QuitFixedTeamConfirmHandler.class));
        // 对标购买
        registerHandler(ConfirmType.BUY_TEAM_ICON, SpringUtils.getBean(BuyTeamIconConfirmHandler.class));
        registerHandler(ConfirmType.BUY_ZML, SpringUtils.getBean(BuyZMLConfirmHandler.class));
    }

    static  {
        /**初始化*/
        INSTANCE.initialize();
    }
}
